vtd: Move dom0 RMRR check to intel_iommu_remove_device()
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Jul 2008 08:25:07 +0000 (09:25 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 30 Jul 2008 08:25:07 +0000 (09:25 +0100)
commitcada0c18f8d184ca8ae902d720b9b95ee7b971ad
tree4070a434086e74b90787afd1f08dbcf4fb730d51
parent1a1af72f08d4d0603f6086c8df8326276a779a6f
vtd: Move dom0 RMRR check to intel_iommu_remove_device()

If put dom0 RMRR check in domain_context_unmap_one(), the devices with
RMRR cannot be assigned to other domain, becuase
domain_context_unmap_one() won't unmap context for them, and dom0
always owns them. This patch moves the check to intel_iommu_remove_device()
which is only called by dom0 hypercall.  This not only guarantees
keeping RMRR mappings for dom0 during its booting, but also won't
impact device assignment.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/drivers/passthrough/vtd/iommu.c